Post

Replies

Boosts

Views

Created

extension of UISegmentedControl for touches events.
extension of UISegmentedControl for touches events in iOS 12 is working but in iOS 13 and in iOS 14 is not working, Why? Can anyone tell me is there any change from iOS 12 version to iOS 13 and 14? or any one is facing same issue? I use this code: @interface UISegmentedControl (CustomSegmentControl) @end @implementation UISegmentedControl (CustomSegmentControl) (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{     NSInteger current = self.selectedSegmentIndex;     [super touchesBegan:touches withEvent:event];     if (current == self.selectedSegmentIndex)         [self sendActionsForControlEvents:UIControlEventValueChanged];     [self.nextResponder touchesBegan:touches withEvent:event]; } (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{     [self setSelectedSegmentIndex:self.selectedSegmentIndex];     [super touchesEnded:touches withEvent:event];     [self.nextResponder touchesEnded:touches withEvent:event]; } @end
7
0
682
Dec ’20